/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_planestudio", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgPlanestudio.findAll", query = "SELECT p FROM PgPlanestudio p"),
    @NamedQuery(name = "PgPlanestudio.findByPgcodPlan", query = "SELECT p FROM PgPlanestudio p WHERE p.pgcodPlan = :pgcodPlan"),
    @NamedQuery(name = "PgPlanestudio.findByPgcodEscuela", query = "SELECT p FROM PgPlanestudio p WHERE p.pgcodEscuela = :pgcodEscuela"),
    @NamedQuery(name = "PgPlanestudio.findByPgestVigente", query = "SELECT p FROM PgPlanestudio p WHERE p.pgestVigente = :pgestVigente"),
    @NamedQuery(name = "PgPlanestudio.findByPgcodFacultad", query = "SELECT p FROM PgPlanestudio p WHERE p.pgcodFacultad = :pgcodFacultad"),
    @NamedQuery(name = "PgPlanestudio.findByPgfechaAprob", query = "SELECT p FROM PgPlanestudio p WHERE p.pgfechaAprob = :pgfechaAprob"),
    @NamedQuery(name = "PgPlanestudio.findByPgCredOblig", query = "SELECT p FROM PgPlanestudio p WHERE p.pgCredOblig = :pgCredOblig"),
    @NamedQuery(name = "PgPlanestudio.findByPgCredElect", query = "SELECT p FROM PgPlanestudio p WHERE p.pgCredElect = :pgCredElect"),
    @NamedQuery(name = "PgPlanestudio.findByPgfechaRegistro", query = "SELECT p FROM PgPlanestudio p WHERE p.pgfechaRegistro = :pgfechaRegistro"),
    @NamedQuery(name = "PgPlanestudio.findByPgfechaInicio", query = "SELECT p FROM PgPlanestudio p WHERE p.pgfechaInicio = :pgfechaInicio"),
    @NamedQuery(name = "PgPlanestudio.findByPgcodInstancia", query = "SELECT p FROM PgPlanestudio p WHERE p.pgcodInstancia = :pgcodInstancia"),
    @NamedQuery(name = "PgPlanestudio.findByPgCredPract", query = "SELECT p FROM PgPlanestudio p WHERE p.pgCredPract = :pgCredPract")})
public class PgPlanestudio implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "pg_codPlan", nullable = false, length = 5)
    private String pgcodPlan;
    @Basic(optional = false)
    @Column(name = "pg_codEscuela", nullable = false, length = 3)
    private String pgcodEscuela;
    @Basic(optional = false)
    @Column(name = "pg_estVigente", nullable = false)
    private char pgestVigente;
    @Basic(optional = false)
    @Column(name = "pg_codFacultad", nullable = false, length = 2)
    private String pgcodFacultad;
    @Basic(optional = false)
    @Column(name = "pg_fechaAprob", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date pgfechaAprob;
    @Basic(optional = false)
    @Column(name = "pg_cred_oblig", nullable = false)
    private int pgCredOblig;
    @Basic(optional = false)
    @Column(name = "pg_cred_elect", nullable = false)
    private int pgCredElect;
    @Basic(optional = false)
    @Column(name = "pg_fechaRegistro", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date pgfechaRegistro;
    @Column(name = "pg_fechaInicio")
    @Temporal(TemporalType.DATE)
    private Date pgfechaInicio;
    @Column(name = "pg_codInstancia", length = 3)
    private String pgcodInstancia;
    @Column(name = "pg_cred_pract")
    private Integer pgCredPract;

    public PgPlanestudio() {
    }

    public PgPlanestudio(String pgcodPlan) {
        this.pgcodPlan = pgcodPlan;
    }

    public PgPlanestudio(String pgcodPlan, String pgcodEscuela, char pgestVigente, String pgcodFacultad, Date pgfechaAprob, int pgCredOblig, int pgCredElect, Date pgfechaRegistro) {
        this.pgcodPlan = pgcodPlan;
        this.pgcodEscuela = pgcodEscuela;
        this.pgestVigente = pgestVigente;
        this.pgcodFacultad = pgcodFacultad;
        this.pgfechaAprob = pgfechaAprob;
        this.pgCredOblig = pgCredOblig;
        this.pgCredElect = pgCredElect;
        this.pgfechaRegistro = pgfechaRegistro;
    }

    public String getPgcodPlan() {
        return pgcodPlan;
    }

    public void setPgcodPlan(String pgcodPlan) {
        this.pgcodPlan = pgcodPlan;
    }

    public String getPgcodEscuela() {
        return pgcodEscuela;
    }

    public void setPgcodEscuela(String pgcodEscuela) {
        this.pgcodEscuela = pgcodEscuela;
    }

    public char getPgestVigente() {
        return pgestVigente;
    }

    public void setPgestVigente(char pgestVigente) {
        this.pgestVigente = pgestVigente;
    }

    public String getPgcodFacultad() {
        return pgcodFacultad;
    }

    public void setPgcodFacultad(String pgcodFacultad) {
        this.pgcodFacultad = pgcodFacultad;
    }

    public Date getPgfechaAprob() {
        return pgfechaAprob;
    }

    public void setPgfechaAprob(Date pgfechaAprob) {
        this.pgfechaAprob = pgfechaAprob;
    }

    public int getPgCredOblig() {
        return pgCredOblig;
    }

    public void setPgCredOblig(int pgCredOblig) {
        this.pgCredOblig = pgCredOblig;
    }

    public int getPgCredElect() {
        return pgCredElect;
    }

    public void setPgCredElect(int pgCredElect) {
        this.pgCredElect = pgCredElect;
    }

    public Date getPgfechaRegistro() {
        return pgfechaRegistro;
    }

    public void setPgfechaRegistro(Date pgfechaRegistro) {
        this.pgfechaRegistro = pgfechaRegistro;
    }

    public Date getPgfechaInicio() {
        return pgfechaInicio;
    }

    public void setPgfechaInicio(Date pgfechaInicio) {
        this.pgfechaInicio = pgfechaInicio;
    }

    public String getPgcodInstancia() {
        return pgcodInstancia;
    }

    public void setPgcodInstancia(String pgcodInstancia) {
        this.pgcodInstancia = pgcodInstancia;
    }

    public Integer getPgCredPract() {
        return pgCredPract;
    }

    public void setPgCredPract(Integer pgCredPract) {
        this.pgCredPract = pgCredPract;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgcodPlan != null ? pgcodPlan.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgPlanestudio)) {
            return false;
        }
        PgPlanestudio other = (PgPlanestudio) object;
        if ((this.pgcodPlan == null && other.pgcodPlan != null) || (this.pgcodPlan != null && !this.pgcodPlan.equals(other.pgcodPlan))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgPlanestudio[ pgcodPlan=" + pgcodPlan + " ]";
    }
    
}
